<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class BookingController extends Controller
{
    public function index(){
        $customer = Auth::user();
        $bookings = $customer->bookings()->with(['availability', 'payment', 'room'])->paginate();
        return view('bookingList', ['bookings' => $bookings]);
    }

    public function delete(Request $request){
        // judge if is checked out
        // remove comment and availability
    }
}
